package util;

import entity.text.ChapterEntity;
import entity.text.PaperEntity;

import java.util.List;

/**
 * @author ：hzs
 * @date ：Created in 2020/12/15 22:12
 * @description：
 * @modified By：
 * @version: $
 */
public class PaperEntityUtil {


    static public String getFullTextFromPaperEntity(PaperEntity paperEntity) {
        List<ChapterEntity> chapterEntities = paperEntity.getChapterEntities();
        StringBuilder stringBuilder = new StringBuilder();
        for (ChapterEntity chapterEntity : chapterEntities) {
            stringBuilder.append(chapterEntity.getContent());
            stringBuilder.append("\n");
        }
        return stringBuilder.toString();
    }

}
